#pragma once

#include <iostream>
#include <sys/ipc.h> // 共享内存
#include <sys/shm.h> // 共享内存
#include <string>
#include <cerrno>
#include <cstdio>
#include <unistd.h>
#include <cstring>

const std::string pathname = "./";
const int proj_id = 0x66;
const int ShmSize = 4096;

// 十六进制返回
std::string ToHex(key_t _key)
{
    char buffer[128];
    snprintf(buffer, sizeof(buffer), "0x%x", _key);
    return buffer;
}